BIN=processbar
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)

$(BIN):$(OBJ)
	@echo "lingking $^ to $@ ..."
	@gcc -o $@ $^
	@echo "finish"

%.o:%.c
	@echo "compiling $< to $@"
	@gcc -c $@ $< -g
	@echo "finish"

.PHONY:
clean:
	@echo "removing $(BIN) and $(OBJ)"
	@rm -f $(BIN) $(OBJ)
	@echo "fihish"
